package com.xone.collaboration.web;

import com.xone.collaboration.service.PushService;
import com.xone.collaboration.common.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class PushController {

    @Autowired
    private PushService pushService;

    @GetMapping("/push/getToken")
    public Result<String> getToken(@RequestParam("appId") String appId, @RequestParam("topic") String topic){
        return pushService.getToken(appId,topic);
    }
}
